﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Alma.Models;
using AlmaDatabase;

namespace Alma.Controllers
{
    public class CategoriesController : Controller
    {
        //
        // GET: /Categories/

        public ActionResult Index()
        {
            using (var context = new AlmaDBEntities())
            {
                Session["PrevProduct"] = null;
                return View(new CategoriesModel() { Categories = context.Categories.OrderBy(x => x.Location).ToList() });
            }
        }

    }
}
